<?php

namespace App\Admin\Forms;

use App\Clients\CrmClient;
use Dcat\Admin\Form\EmbeddedForm;
use Dcat\Admin\Widgets\Form;
use Illuminate\Support\Arr;

class NotePlanForm extends Form
{

    /**
     * Handle the form request.
     *
     * @param array $input
     *
     * @return mixed
     */
    public function handle(array $input)
    {
        admin_setting($input);
        return $this
            ->response()
            ->success('保存留言成功');
    }

    /**
     * Build a form here.
     */
    public function form()
    {
        $this->width(12)->text('note_plan_title','留言板标题')->default('留言');
        $this->width(12)->textarea('note_plan','留言内容');
        $this->disableResetButton();
    }

    /**
     * The data of the form.
     *
     * @return array
     */
    public function default()
    {
        return admin_setting()->toArray();
    }
}
